/**
 * 
 */
package com.gr.experimental.model.impl;

import com.gr.experimental.model.RVClass;
import com.gr.experimental.model.RVClassInfluence;



/**
 * @author Karol Banczyk
 *
 */
class RVClassInfluenceImpl implements RVClassInfluence {

	RVClass rvClass;
//	private List<ObjectCount<RVState>> rvStates;
	int[] rvStateInfluenceCounts;
	int rvClassInfluecneCount;
	
	
	public RVClassInfluenceImpl(RVClass rvClass, int[] counts) {
		this.rvClass = rvClass;  
		this.rvStateInfluenceCounts = counts.clone();
		for (int x : counts) {
			rvClassInfluecneCount +=x;
		}
	}
	
//	public RVClassInfluence(List<ObjectCount<RVState>> states) {
//		this.rvStates = states;
//		if (states.size() == 0) {
//			throw new IllegalArgumentException("state list may not be null");
//		}
//		RVClass firstRvClass = states.get(0).getObject().getRVClass();
//		for (ObjectCount<RVState> rvStateCount: states) {
//			 RVClass rvClass = rvStateCount.getObject().getRVClass();
//			 if (! rvClass.equals(rvClass)) {
//				 throw new IllegalArgumentException("Various RV classes in RV class states: " + firstRvClass + " and " + rvClass);
//			 }
//		}
//		this.rvClass = firstRvClass;
//	}

//	public List<ObjectCount<RVState>> getRvStates() {
//		return rvStates;
//	}
	
	/**
	 * {@inheritDoc}
	 * @see com.gr.experimental.model.RVClassInfluence#getRVStateInfluenceCounts()
	 */
	public int[] getRVStateInfluenceCounts() {
		return rvStateInfluenceCounts;
	}

	/**
	 * {@inheritDoc}
	 * @see com.gr.experimental.model.RVClassInfluence#getRvClassInfluenceCount()
	 */
	public int getRvClassInfluenceCount() {
		return rvClassInfluecneCount;
	}

	/**
	 * {@inheritDoc}
	 * @see com.gr.experimental.model.RVClassInfluence#getRVClass()
	 */
	public RVClass getRVClass() {
		return rvClass;
	}
}
